{% load i18n %}
<form method="post" action="/register/" id="register-form">
    {% csrf_token %}
    {% for field in registration_form %}
        <div class="field">
            {% if field.errors %}
                <div class="login-fail">
                    {{ field.errors }}
                </div>
            {% endif %}
            {{ field.label_tag }} {{ field }}
        </div>
    {% endfor %}
    <label class="checkbox"> {% trans 'Agree with terms of use' %}
        <input name="accept_terms" type="checkbox">
        <span class="checkmark"></span>
    </label>
    {% if error %}
        <div class="login-fail">
            {{ error }}
        </div>
    {% endif %}
    <script src='https://www.google.com/recaptcha/api.js'></script>
    <div class="g-recaptcha" data-sitekey="6LfmztAUAAAAADHG9um9MipePrcP9_DFuWrkjA3w"></div>
    <p><input type="button" onclick="register()" value="{% trans 'Sing up' %}"/></p>
</form>
<input type="button" value="{% trans 'Log in' %}" onclick="show_login()" class="singup"/>
